﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/Admin.Master" AutoEventWireup="true" CodeBehind="tb_User.aspx.cs" Inherits="MyWeb.Admins.tb_User" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div class="title">Manage User</div>
    <asp:Panel ID="pnShow" runat="server" Width="100%">
        <table id="Table1" style="border-collapse: collapse; background-color: #D0DEF0;" cellpadding="0" width="100%" border="0">
            <tr>
                <td>
                    <asp:Button ID="btnThem" runat="server" CssClass="btnthem" Text="Add New" OnClick="btnThem_Click" /><asp:Button ID="btnXoa" runat="server" CssClass="btnXoa" Text="Delete" OnClick="btnXoa_Click" /></td>
            </tr>
        </table>
        <asp:DataGrid ID="grdtb_User" runat="server" AllowPaging="True" AutoGenerateColumns="False" CellPadding="4" ForeColor="#333333" Width="100%" OnPageIndexChanged="grdtb_User_PageIndexChanged" PageSize="10" OnItemCommand="grdtb_User_ItemCommand" OnItemDataBound="grdtb_User_ItemDataBound">
            <AlternatingItemStyle BackColor="White" />
            <HeaderStyle CssClass="trHeader"></HeaderStyle>
            <Columns>
                <asp:TemplateColumn ItemStyle-CssClass="tdCenter">
                    <HeaderTemplate>
                        <asp:CheckBox ID="chkSelectAll" runat="server" AutoPostBack="False"></asp:CheckBox></HeaderTemplate>
                    <ItemTemplate>
                        <asp:CheckBox ID="chkSelect" runat="server"></asp:CheckBox></ItemTemplate>
                    <ItemStyle CssClass="tdCenter"></ItemStyle>
                </asp:TemplateColumn>
                <asp:BoundColumn DataField="Username" HeaderText="Username"></asp:BoundColumn>
                <asp:BoundColumn DataField="Password" HeaderText="Password"></asp:BoundColumn>
                <asp:BoundColumn DataField="Address" HeaderText="Address"></asp:BoundColumn>
                <asp:BoundColumn DataField="Phone" HeaderText="Phone"></asp:BoundColumn>
                <asp:BoundColumn DataField="Gender" HeaderText="Gender"></asp:BoundColumn>
                <asp:BoundColumn DataField="Status" HeaderText="Status"></asp:BoundColumn>
                <asp:TemplateColumn ItemStyle-Width="100px" ItemStyle-HorizontalAlign="Center">
                    <HeaderTemplate>Functions</HeaderTemplate>
                    <ItemTemplate>
                        <asp:LinkButton ID="lbt1" runat="server" CommandArgument='<%#DataBinder.Eval(Container.DataItem,"Username")%>' CommandName="Edit" CssClass="edit" ToolTip="Sửa">&nbsp;</asp:LinkButton>|<asp:LinkButton ID="lbt2" runat="server" CommandArgument='<%#DataBinder.Eval(Container.DataItem,"Username")%>' CommandName="Delete" CssClass="delete" OnClientClick="return confirm(&quot;are you sure?&quot;)" ToolTip="Xóa">&nbsp;</asp:LinkButton></ItemTemplate>
                    <ItemStyle HorizontalAlign="Center" Width="100px" />
                </asp:TemplateColumn>
            </Columns>
            <EditItemStyle BackColor="#2461BF" />
            <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
            <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" HorizontalAlign="Center" />
            <ItemStyle BackColor="#EFF3FB" />
            <PagerStyle BackColor="#F3F8FE" ForeColor="Blue" HorizontalAlign="Center" Mode="NumericPages" />
            <SelectedItemStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
        </asp:DataGrid>
    </asp:Panel>
    <asp:Panel ID="pnUpdate" runat="server" Visible="False" Width="100%">
        <table id="Table2" style="border-collapse: collapse" cellpadding="0" width="100%" border="0">
            <tr>
                <td width="150" height="10"></td>
                <td height="10"></td>
            </tr>
            <tr>
                <td width="150" class="name_fild_row">&nbsp;<asp:Label ID="lblUsername" runat="server">Username</asp:Label></td>
                <td>
                    <asp:TextBox ID="txtUsername" runat="server" Width="200px" ReadOnly="True"></asp:TextBox></td>
            </tr>
            <tr>
                <td width="150" class="name_fild_row">&nbsp;<asp:Label ID="lblPassword" runat="server">Password</asp:Label></td>
                <td>
                    <asp:TextBox ID="txtPassword" runat="server" Width="200px"></asp:TextBox></td>
            </tr>
            <tr>
                <td width="150" class="name_fild_row">&nbsp;<asp:Label ID="lblAddress" runat="server">Address</asp:Label></td>
                <td>
                    <asp:TextBox ID="txtAddress" runat="server" Width="200px"></asp:TextBox></td>
            </tr>
            <tr>
                <td width="150" class="name_fild_row">&nbsp;<asp:Label ID="lblPhone" runat="server">Phone</asp:Label></td>
                <td>
                    <asp:TextBox ID="txtPhone" runat="server" Width="200px"></asp:TextBox></td>
            </tr>
            <tr>
                <td width="150" class="name_fild_row">&nbsp;<asp:Label ID="lblGender" runat="server">Gender</asp:Label></td>
                <td>
                    <asp:CheckBox ID="ckbGender" runat="server" />
                </td>
            </tr>
            <tr>
                <td width="150" class="name_fild_row">&nbsp;<asp:Label ID="lblStatus" runat="server">Status</asp:Label></td>
                <td>
                    <asp:CheckBox ID="ckbStatus" runat="server" />
                </td>
            </tr>
            <tr>
                <td width="150">&nbsp;</td>
                <td><asp:LinkButton ID="lbtUpdate" CssClass="update" runat="server" OnClick="lblUpdate_Click">Update</asp:LinkButton>&nbsp;&nbsp;<asp:LinkButton ID="lblBack" runat="server" CssClass="back" OnClick="lblBack_Click">Back</asp:LinkButton></td>
            </tr>
        </table>
    </asp:Panel>
</asp:Content>
